#include <uuid/uuid.h>

#define NIT_SHORT_NAMES
#include <nit/macros.h>
#include <nit/palloc.h>
#include <nit/list.h>

#include "des.h"
#include "cell.h"
#include "frm.h"

Inb_frm *
inb_frm_new(uuid_t id, Inb_cell *flds)
{
	Inb_frm *frm;
	Inb_des *des = inb_palloc(frm);

	pcheck(des, NULL);
	des->type = FRM;
	des->flags = INB_FREE;
	frm = inb_thing(des);
	id ? uuid_copy(frm->id, id) : uuid_generate(frm->id);
	frm->flds = flds;
	return frm;
}
